#include<iostream>
#include<algorithm>
#include<cstring>
#include<cmath>
using namespace std;
int a[25];
int n,k;
double ans=0xffffffff;
double jl[20][20];
double point[20][2];
int bj[25];
int cnt=0;
void dfs(int now,double sum,int last){
    cnt++;
    if(cnt>=22000000){
        printf("%.2lf",ans);
        exit(0);
    }
    if(now==n+1){
        if(ans>=sum)ans=sum;
        return;
    }
    for(int i=1;i<=n;i++){
        if(bj[i])continue;
        if(sum+jl[last][i]>=ans)continue;
        bj[i]=1;
        dfs(now+1,sum+jl[last][i],i);
        bj[i]=0;
    }
}

int main(){

    cin>>n;
    for(int i=1;i<=n;i++){
        cin>>point[i][0]>>point[i][1];
    }
    for(int i=0;i<=n;i++){
        for(int j=0;j<=n;j++){
            if(i!=j){
                jl[i][j]=sqrt(1.0*((point[i][0]-point[j][0])*(point[i][0]-point[j][0])+(point[i][1]-point[j][1])*(point[i][1]-point[j][1])));
            }
        }
    }
    dfs(1,0,0);
     printf("%.2lf",ans);
    return 0;
}